package Model;

/**
 *
 * @author Simon Marshall
 * @author jc209673
 */
public class Car {
    
    // Cars are in an ArrayList
    // Cars spawn at start of lane in horizontal or vertical
    // Cannot move unless there is at least 1 free space ahead of its current location
    // 3 different types of vehicles
    // 10W x 10L for a motorbike
    // 15W x 15L for a car
    // 20W x 20L for a truck

    //                               Cars.java Logic

    // 1. Vehicles will only spawn if the spawning square and the square in front of it is vacant
    // 2. Vehicles will only move if the square in front of it is vacant
    // 3. On Red and Yellow Light States, vehicles will not proceed through the intersection and will stop the square before the intersection
    // 4. Vehicles will only move through intersection on Green Light State
    // 5. If lanes are full back to spawning square do not spawn a new vehicle until first point is true regardless of probability for a vehicle to enter either lane

    private int vehicleLocation; // Position is a number from 1 to 25
    private int vehicleSize; //

    /**
     *
     * @return Returns the location of all vehicles in each lane that is stored in an ArrayList
     */
    public int getVehicleLocation() {
        return vehicleLocation;
    }

    /**
     * Moves each vehicle that start at zero and increase by one (+1) until reaches 25 and then is popped/removed from the ArrayList
     */
    public void moveVehicle() {
        ++vehicleLocation;
    }

}


